import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/base/Home'
import Table from '@/components/views/Table'
import Form from '@/components/views/Form'
import Tabs from '@/components/views/Tabs'
import Collapse from '@/components/views/Collapse'
import MyEcharts from '@/components/views/MyEcharts'
import OrgTree from '@/components/sub/OrgTree'

Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      children:[
          {
            path: 'org',
            name: 'org',
            component: OrgTree
          },
          {
            path: 'form',
            name: 'form',
            component: Form
          }
        ]
    },
    {
      path: '/test',
      name: 'home',
      component: Home,
      children:[
        {
          path: '/tabs',
          name: 'tabs',
          component: Tabs
        },
        {
          path: '/collapse',
          name: 'collapse',
          component: Collapse
        }
      ]
    },
    {
      path: '/load',
      name: 'home',
      component: Home,
      children:[
        {
          path: '/chart',
          name: 'chart',
          component: MyEcharts
        }
      ]
    }
  ]
})
